const promise = require('./promise');

const https = (obj={url:'',params:{},method:'GET',success,faild}) => {
    console.log(obj.url);
    wx.showNavigationBarLoading();
    if (obj.url=='')
        faild()
    wx.request({
        url: obj.url,
        header: {
            'content-type': 'application/json' // 默认值
        },
        method: obj.method ,
        success: obj.success ,
        faild: obj.faild
    })
}

module.exports = {
    https:https
}
